package com.huawei.demo;

import com.huawei.demo.client.CartClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    //像调用service一样调用client
    @Autowired
    CartClient cartClient666;

    @RequestMapping("/test/{userId}/{businessId}")
    public String test(@PathVariable("userId") Integer userId, @PathVariable("businessId") Integer businessId){
        String result=cartClient666.list(userId,businessId);
        return result;
    }
}
